<script setup>
import {pageofficeOpenFile} from "@/plugins/pageoffice/pageoffice-common.js";
import {signApproved} from "@/api/document/processDocument.js";
import FlowInfoView from "@/views/document/process/processing/flowInfo/common/flowInfoView.vue";

const prop = defineProps({
  documentInfo: {
    type: Object
  },
  flowInfoButtons: {
    type: JSON
  },
  isRefreshAdvice: {
    type: Boolean
  }
})
const docId = prop.documentInfo.id

function openMainFile() {
  pageofficeOpenFile('/document/processing/sign/openFinalFile/' + docId, docId)
}

</script>

<template>
  <FlowInfoView :documentInfo="documentInfo" :isBack="flowInfoButtons.isBack" :isApproved="flowInfoButtons.isSign" :approvedFunction="signApproved"
  :isRefreshAdvice="isRefreshAdvice">
    <template #default>
      <el-button type="primary" @click="openMainFile">打开正文</el-button>
    </template>
  </FlowInfoView>
</template>

